from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import render

# Create your views here.
from django.views import View

from apps.user.models import Article


class ArticleView(LoginRequiredMixin, View):
    def get(self, request):
        id_acticle = request.GET.get("id")
        print(id_acticle)
        article = Article.objects.filter(id=id_acticle)
        print(article)
        contents = {
            "content":article,
        }
        return render(request,"forum-post-view.html", contents)
